package com.atguigu.eduservice.controller;/*
@author shkatart
@date 2021-01-07 -10:35
*/

import com.atguigu.commonutils.R;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin  //解决跨域访问
public class EduLoginController {

    //login
    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    //info
    @GetMapping("info")
    public R info(){
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar","https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsrc.onlinedown.net%2Fd%2Ffile%2Fp%2F2017-04-07%2Fc5a76cb1b73f682801921370305a1fc8.jpg&refer=http%3A%2F%2Fsrc.onlinedown.net&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1612928429&t=c263a751a90a6cfa7a56b157056f2a0e");
    }
}
